{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "dd9df8f3",
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "data = np.loadtxt(\"beijing+multi+site+air+quality+data\\PRSA_Data_20130301-20170228\\PRSA_Data_Changping_20130301-20170228.csv\", delimiter=\",\",  skiprows=1,  dtype=str)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "52e0840c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['1' '2013' '3' ... '\"E\"' '0.5' '\"Changping\"']\n",
      " ['2' '2013' '3' ... '\"ENE\"' '0.7' '\"Changping\"']\n",
      " ['3' '2013' '3' ... '\"ENE\"' '0.2' '\"Changping\"']\n",
      " ...\n",
      " ['35062' '2017' '2' ... '\"N\"' '1.5' '\"Changping\"']\n",
      " ['35063' '2017' '2' ... '\"NW\"' '1.4' '\"Changping\"']\n",
      " ['35064' '2017' '2' ... '\"N\"' '1.9' '\"Changping\"']]\n"
     ]
    }
   ],
   "source": [
    "print(data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "3db95cbe",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([['1', '2013', '3', ..., '\"E\"', '0.5', '\"Changping\"'],\n",
       "       ['2', '2013', '3', ..., '\"ENE\"', '0.7', '\"Changping\"'],\n",
       "       ['3', '2013', '3', ..., '\"ENE\"', '0.2', '\"Changping\"'],\n",
       "       ...,\n",
       "       ['35062', '2017', '2', ..., '\"N\"', '1.5', '\"Changping\"'],\n",
       "       ['35063', '2017', '2', ..., '\"NW\"', '1.4', '\"Changping\"'],\n",
       "       ['35064', '2017', '2', ..., '\"N\"', '1.9', '\"Changping\"']],\n",
       "      dtype='<U18')"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "ee252fbd",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(35064, 18)"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "cf84ee5c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.ndim"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "fd572ef8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "631152"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data.size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "016b927d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([['1', '2013', '3', ..., '\"E\"', '0.5', '\"Dingling\"'],\n",
       "       ['2', '2013', '3', ..., '\"ENE\"', '0.7', '\"Dingling\"'],\n",
       "       ['3', '2013', '3', ..., '\"ENE\"', '0.2', '\"Dingling\"'],\n",
       "       ...,\n",
       "       ['35062', '2017', '2', ..., '\"N\"', '1.5', '\"Dingling\"'],\n",
       "       ['35063', '2017', '2', ..., '\"NW\"', '1.4', '\"Dingling\"'],\n",
       "       ['35064', '2017', '2', ..., '\"N\"', '1.9', '\"Dingling\"']],\n",
       "      dtype='<U18')"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import numpy as np\n",
    "dataDingling = np.loadtxt(\"beijing+multi+site+air+quality+data\\PRSA_Data_20130301-20170228\\PRSA_Data_Dingling_20130301-20170228.csv\", delimiter=\",\",  skiprows=1,  dtype=str)\n",
    "dataDingling"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "19568c16",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([['1', '2013', '3', ..., '\"E\"', '0.5', '\"Changping\"'],\n",
       "       ['2', '2013', '3', ..., '\"ENE\"', '0.7', '\"Changping\"'],\n",
       "       ['3', '2013', '3', ..., '\"ENE\"', '0.2', '\"Changping\"'],\n",
       "       ...,\n",
       "       ['35062', '2017', '2', ..., '\"N\"', '1.5', '\"Dingling\"'],\n",
       "       ['35063', '2017', '2', ..., '\"NW\"', '1.4', '\"Dingling\"'],\n",
       "       ['35064', '2017', '2', ..., '\"N\"', '1.9', '\"Dingling\"']],\n",
       "      dtype='<U18')"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.vstack((data,dataDingling))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "c5d3049b",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(70128, 18)"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.vstack((data,dataDingling)).shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "152e8510",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([['2013', '3', '1'],\n",
       "       ['2013', '3', '1'],\n",
       "       ['2013', '3', '1'],\n",
       "       ...,\n",
       "       ['2017', '2', '28'],\n",
       "       ['2017', '2', '28'],\n",
       "       ['2017', '2', '28']], dtype='<U18')"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data[:,1:4]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4acf0fcd",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.4"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": false,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
